<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<link href="assets/css/bootstrap-select.css" rel="stylesheet"/>
<script src="assets/js/select2/select2.js"></script>
<div class="row">
    <!-- 映射列表 -->
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="leftTree">

        <div class="row" style="margin-bottom: 15px;margin-top:15px;font-size: 14px">
                    <span style="padding-left: 16px">
                        请选择报班所要退费的课时包
                    </span>
        </div>

        <div class="widget flat radius-bordered">
            <div class="widget-body no-padding">
                <div class="table-scrollable">
                    <!-- 数据表列信息列表 -->
                    <table class="table table-bordered dataTable">
                        <thead>
                        <tr>
                            <!--<th title="选择" class="checkboxColumnTh fixedColumn " fixed-align="left">-->

                            <!--</th>-->
                            <th title="合同号">合同号</th>
                            <th title="课时包名称">课时包名称</th>
                            <th title="总课时数">总课时数</th>
                            <th title="已耗课时">已耗课时</th>
                            <th title="剩余课时数">剩余课时</th>
                            <th title="原单价">原单价</th>
                            <th title="总价">总价</th>
                            <th title="剩余有效时期">剩余有效时期</th>
                            <th title="所属顾问">所属顾问</th>
                            <th title="缴费状态">缴费状态</th>
                            <th class="操作">操作项</th>
                        </tr>
                        </thead>
                        <tbody>
                        <input type="hidden" name="memberType" class="memberType" value="${memberType}">
                        <#if memberPackagesList?size==0>
                            <tr>
                                <td align="center">无数据</td>
                            </tr>
                        </#if>
                        <#list memberPackagesList as data>
                            <tr>
                                <!--<td class="checkboxColumnTd">-->
                                <!--<label>-->
                                <!--<input type="radio" class="chk"  name="id" value="${data.id}">-->
                                <!--<span class="text"></span>-->
                                <!--</label>-->
                                <!--</td>-->
                                <td></td>
                                <td>${(data.packageId???string(data.packageId?html,"未设置"))!'未设置'}</td>
                                <td></td>
                                <td></td>
                                <td>${(data.presentClassHour???string(data.presentClassHour?html,"未设置"))!'未设置'}</td>
                                <td>
                                    ${(data.usableTotalClassHour???string(data.usableTotalClassHour?html,"未设置"))!'未设置'}
                                </td>
                                <td>${(data.attendanceDay???string(data.attendanceDay?html,"未设置"))!'未设置'}</td>
                                <td>${(data.surplusClassHour???string(data.surplusClassHour?html,"未设置"))!'未设置'}</td>
                                <td>${(data.usableTotal???string(data.usableTotal?html,"未设置"))!'未设置'}</td>
                                <td></td>
                                <td align="center">
                                    <a onclick="showDialogReturnPremium(this)" serializeNum="${serializeNum}"
                                       editUrl="${editUrl}" targetDataId="${data.memberId}">退费</a>
                                </td>
                            </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(".selectpicker").select2();

    function showDialogReturnPremium(that) {
        var serializeNum = $(that).attr("serializeNum");
        ajaxRequest("tssMemberReturnPremiumController/toEditView.do", {
            serializeNum: serializeNum,
        }, function (html) {
            getTopWin().bootbox.dialog({
                message: html,
                title: "亲子退费",
                className: 'myDialog'
            });
        }, function () {
            ajaxError("加载页面失败!")
        }, "get", "html")
    }

</script>